package com.codeoss.module.res.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.codeoss.module.res.request.RelUserRolePageRequest;
import com.codeoss.module.res.response.RelUserRolePageResponse;
import com.codeoss.module.res.service.IRelUserRolePageService;

@Controller
@RequestMapping("reluserrolepage")
public class RelUserRolePageController {
	@Autowired
	private IRelUserRolePageService relUserRolePageService;
	@RequestMapping(value = "init", method = RequestMethod.GET)
	@ResponseBody
	public RelUserRolePageResponse init(@RequestParam("resUserId") Long resUserId){
		RelUserRolePageResponse relUserRolePageResponse=relUserRolePageService.init(resUserId);
		return relUserRolePageResponse;
	}
	
	@RequestMapping(value = "dataSave", method = RequestMethod.POST)
	@ResponseBody
	public RelUserRolePageResponse dataSave(@RequestBody RelUserRolePageRequest request){
		RelUserRolePageResponse relUserRolePageResponse=relUserRolePageService.dataSave(request);
		return relUserRolePageResponse;
	}
}
